package com.jhx.common.utils;

import com.jhx.common.app.CommonModule;

import java.util.HashMap;

/**
 * @author jack
 */
public final class Constants {
    /**
     * 是否是测试环境
     */
    public static final boolean DEBUG = CommonModule.Companion.isDebug();
    /**
     * 是否打印日志
     */
    public static final boolean PRINT_LOG = DEBUG;

    public static final String IMAGE_FILE_SUFFIX = ".jpg";
    public static final String IMAGE_GIF_SUFFIX = ".gif";
    public static final String VIDEO_FILE_SUFFIX = ".mp4";
    public static final String AUDIO_FILE_SUFFIX = ".amr";
    public static final String TEXT_FILE_SUFFIX = ".txt";
    public static final String SEPERATOR = "0xd733480";

    public static final String IS_LOGIN = "is_login";
    public static final String USER_INFO = "user_info";
    public static final String TOKEN_ID = "token_id";
    public static final String ALI_OS = "ali_os";
    public static final String RECOMMEND_PHONE = "recommend_phone";
    public static final String IS_SHOW_EXPIRED =  "is_show_expired";
    public static final String PAY_MONEY_URL =  "pay_money_url";
    public static final String IS_SERVICE_BUSINESS =  "is_service_business";

    public static final String ENV_LOCAL = "192.168.1.125:6611/app/";
    public static final String ENV_NEW_LOCAL = "192.168.8.147:8080/app/";

    public static final String ENV_TEST = "ad-v2.hongxinyp.com/app/";
    public static final String ENV_NEW_TEST = "o2o-admin.test.join51.com/app/";

    public static final String ENV_PRODUCT = "ad-v2.meilbh.com/app/";
    public static final String ENV_NEW_PRODUCT = "jhxshop.jhxia.com/app/";

    /**
     * 平台扣点是否设置 0.未设置
     */
    public static int DISCOUNT_UN_SET = 0;
    /**
     * 1.已设置
     */
    public static int DISCOUNT_SET = 1;
    /**
     * 是否加盟店 1.是 0.否
     */
    public static int HEAD_TAG_VISIBLE = 1;

    /**
     * 文件类型
     */
    public enum FileType {
        IMAGE,
        VIDEO,
        AUDIO,
        TEXT
    }

    static class EmptyMap extends HashMap<Integer, String> {

        @Override
        public String get(Object key) {
            return null;
        }
    }

    /**
     * 审核状态
     */
    public static class ApprovalStatus{
        // 审核失败
        public static final int APPROVAL_ERROR = 3;
        // 审核成功
        public static final int APPROVAL_SUCCESS = 2;
        // 审核中
        public static final int APPROVALING = 1;

        public static final int PLATFORM_DISCOUNT = 3;
    }

    /**
     * 验证码类型
     */
    public static class CodeType {
        //注册验证码
        public static final int mRegisteCode = 1;

        public static final int mGetBackCode = 2;
        //支付密码验证码
        public static final int mPayPwdCode = 3;
    }

    public static class PayList {
        /**
         * 钱包余额支付
         */
        public static final int PAYMENT_TYPE_PP_PAY = 0;
        /**
         * 支付宝支付
         */
        public static final int PAYMENT_TYPE_ALIPAY = 1;
        /**
         * 微信支付
         */
        public static final int PAYMENT_TYPE_WE_CHAT = 2;
        /**
         * 线下POS支付
         */
        public static final int PAYMENT_TYPE_POS = 30;
        /**
         * 代理微信支付
         */
        public static final int PAYMENT_TYPE_PROXY_WE_CHAT = 24;

        /**
         * 微信扫码
         */
        public static final int PAYMENT_TYPE_WX_QR = 10;
        /**
         * 支付宝扫码
         */
        public static final int PAYMENT_TYPE_AL_QR = 9;
        /**
         * 微信扫码
         */
        public static final int PAYMENT_TYPE_WX = 20;
        /**
         * 支付宝跳转浏览器
         */
        public static final int PAYMENT_TYPE_AL = 12;

        // 快捷支付
        public static final int PAYMENT_QUICK_PAY = 22;

        /**
         * 联盈微信扫码
         */
        public static final int PAYMENT_TYPE_LIANYING_QR = 21;
        /**
         * QQ钱包扫码
         */
        public static final int PAYMENT_TYPE_QQ_QR = 18;
    }
}
